Function isotope::parser::ident [−][src]
pub fn ident(input: &str) -> IResult<&str, &str>
Expand description
Parse a string forming a valid isotope
identifier
An isotope
identifier may be any sequence of non-whitespace characters which does not
contain a special character. This parser does not consume preceding whitespace!
Examples
assert_eq!(ident("hello "), Ok((" ", "hello"))); assert!(ident(" bye").is_err()); assert!(ident("0x35").is_err()); assert_eq!(ident("x35"), Ok(("", "x35"))); assert_eq!(ident("你好"), Ok(("", "你好"))); let arabic = ident("الحروف العربية").unwrap(); let desired_arabic = (" العربية" ,"الحروف"); assert_eq!(arabic, desired_arabic);